package wuziqi;

import java.awt.*;

public class ChessMan {
    public enum Size{
        X,O,m;
    }
    private final Size size;
    private String type;//棋子状态连了几颗
    private int x;
    private int y;
    private boolean isOnBoard;
    public ChessMan(String id,Size size,String type,int x,int y){
        this.size=size;
        this.type=type;
        this.x=x;
        this.y=y;
        this.isOnBoard=true;
    }
    public Size getSize(){
        return size;
    }
    public String getType(){
        return type;
    }
    public int getX(){
        return x;
    }
    public int getY(){
        return y;
    }
    public boolean isOnBoard(){
        return isOnBoard;
    }
    public void setX(int x){
        this.x=x;
    }
    public void setY(int y){
        this.y=y;
    }

    public void setOnBoard(boolean onBoard) {
        isOnBoard = onBoard;
    }
    public void updatePosition(int x,int y){
        this.x=x;
        this.y=y;
    }
}
